home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / NetSprocket.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  18.2 KB  |  618 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        NetSprocket.a
  3. ;
  4. ;    Contains:    Games Sprockets: NetSprocket interfaces
  5. ;
  6. ;    Version:    Technology:    NetSprocket 1.0.2
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1996-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__NETSPROCKET__') = 'UNDEFINED' THEN
  18. __NETSPROCKET__ SET 1
  19.  
  20.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  21.     include 'ConditionalMacros.a'
  22.     ENDIF
  23.  
  24.     IF TARGET_OS_MAC THEN
  25.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  26.     include 'MacTypes.a'
  27.     ENDIF
  28.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  29.     include 'Events.a'
  30.     ENDIF
  31.     ENDIF    ; TARGET_OS_MAC
  32.     IF TARGET_OS_MAC THEN
  33.  
  34. kNSpMaxPlayerNameLen            EQU        31
  35. kNSpMaxGroupNameLen                EQU        31
  36. kNSpMaxPasswordLen                EQU        31
  37. kNSpMaxGameNameLen                EQU        31
  38. kNSpMaxDefinitionStringLen        EQU        255
  39.  
  40. ;  NetSprocket basic types 
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49. ; typedef SInt32                         NSpEventCode
  50.  
  51. ; typedef SInt32                         NSpGameID
  52.  
  53. ; typedef SInt32                         NSpPlayerID
  54.  
  55. ; typedef NSpPlayerID                     NSpGroupID
  56.  
  57. ; typedef UInt32                         NSpPlayerType
  58.  
  59. ; typedef SInt32                         NSpFlags
  60.  
  61. NSpPlayerName            RECORD 0
  62. f                         ds        Str31
  63. sizeof                     EQU *                    ; size:   $20 (32)
  64.                         ENDR
  65.  
  66.  
  67. ;  Individual player info 
  68. NSpPlayerInfo            RECORD 0
  69. id                         ds.l    1                ; offset: $0 (0)
  70. playerType                 ds.l    1                ; offset: $4 (4)        ;  "type" in C
  71. name                     ds        Str31            ; offset: $8 (8)
  72. groupCount                 ds.l    1                ; offset: $28 (40)
  73. groups                     ds.l    1                ; offset: $2C (44) <-- really an array of length one
  74. sizeof                     EQU *                    ; size:   $30 (48)
  75.                         ENDR
  76. ; typedef struct NSpPlayerInfo *        NSpPlayerInfoPtr
  77.  
  78. ;  list of all players 
  79. NSpPlayerEnumeration    RECORD 0
  80. count                     ds.l    1                ; offset: $0 (0)
  81. playerInfo                 ds.l    1                ; offset: $4 (4) <-- really an array of length one
  82. sizeof                     EQU *                    ; size:   $8 (8)
  83.                         ENDR
  84. ; typedef struct NSpPlayerEnumeration *    NSpPlayerEnumerationPtr
  85.  
  86. ;  Individual group info 
  87. NSpGroupInfo            RECORD 0
  88. id                         ds.l    1                ; offset: $0 (0)
  89. playerCount                 ds.l    1                ; offset: $4 (4)
  90. players                     ds.l    1                ; offset: $8 (8) <-- really an array of length one
  91. sizeof                     EQU *                    ; size:   $C (12)
  92.                         ENDR
  93. ; typedef struct NSpGroupInfo *            NSpGroupInfoPtr
  94.  
  95. ;  List of all groups 
  96. NSpGroupEnumeration        RECORD 0
  97. count                     ds.l    1                ; offset: $0 (0)
  98. groups                     ds.l    1                ; offset: $4 (4) <-- really an array of length one
  99. sizeof                     EQU *                    ; size:   $8 (8)
  100.                         ENDR
  101. ; typedef struct NSpGroupEnumeration *    NSpGroupEnumerationPtr
  102.  
  103. ;  Topology types 
  104. ; typedef UInt32                         NSpTopology
  105.  
  106.  
  107. kNSpClientServer                EQU        $00000001
  108. ;  Game information 
  109. NSpGameInfo                RECORD 0
  110. maxPlayers                 ds.l    1                ; offset: $0 (0)
  111. currentPlayers             ds.l    1                ; offset: $4 (4)
  112. currentGroups             ds.l    1                ; offset: $8 (8)
  113. topology                 ds.l    1                ; offset: $C (12)
  114. reserved                 ds.l    1                ; offset: $10 (16)
  115. name                     ds        Str31            ; offset: $14 (20)
  116. password                 ds        Str31            ; offset: $34 (52)
  117. sizeof                     EQU *                    ; size:   $54 (84)
  118.                         ENDR
  119. ;  Structure used for sending and receiving network messages 
  120. NSpMessageHeader        RECORD 0
  121. version                     ds.l    1                ; offset: $0 (0)        ;  Used by NetSprocket.  Don't touch this 
  122. what                     ds.l    1                ; offset: $4 (4)        ;  The kind of message (e.g. player joined) 
  123. from                     ds.l    1                ; offset: $8 (8)        ;  ID of the sender 
  124. toID                     ds.l    1                ; offset: $C (12)        ;  (player or group) id of the intended recipient (was "to) 
  125. id                         ds.l    1                ; offset: $10 (16)        ;  Unique ID for this message & (from) player 
  126. when                     ds.l    1                ; offset: $14 (20)        ;  Timestamp for the message 
  127. messageLen                 ds.l    1                ; offset: $18 (24)        ;  Bytes of data in the entire message (including the header) 
  128. sizeof                     EQU *                    ; size:   $1C (28)
  129.                         ENDR
  130. ;  NetSprocket-defined message structures 
  131. NSpErrorMessage            RECORD 0
  132. header                     ds        NSpMessageHeader ; offset: $0 (0)
  133. error                     ds.l    1                ; offset: $1C (28)
  134. sizeof                     EQU *                    ; size:   $20 (32)
  135.                         ENDR
  136. NSpJoinRequestMessage    RECORD 0
  137. header                     ds        NSpMessageHeader ; offset: $0 (0)
  138. name                     ds        Str31            ; offset: $1C (28)
  139. password                 ds        Str31            ; offset: $3C (60)
  140. theType                     ds.l    1                ; offset: $5C (92)
  141. customDataLen             ds.l    1                ; offset: $60 (96)
  142. customData                 ds.b    1                ; offset: $64 (100) <-- really an array of length one
  143.                          ORG 102
  144. sizeof                     EQU *                    ; size:   $66 (102)
  145.                         ENDR
  146. NSpJoinApprovedMessage    RECORD 0
  147. header                     ds        NSpMessageHeader ; offset: $0 (0)
  148. sizeof                     EQU *                    ; size:   $1C (28)
  149.                         ENDR
  150. NSpJoinDeniedMessage    RECORD 0
  151. header                     ds        NSpMessageHeader ; offset: $0 (0)
  152. reason                     ds        Str255            ; offset: $1C (28)
  153. sizeof                     EQU *                    ; size:   $11C (284)
  154.                         ENDR
  155. NSpPlayerJoinedMessage    RECORD 0
  156. header                     ds        NSpMessageHeader ; offset: $0 (0)
  157. playerCount                 ds.l    1                ; offset: $1C (28)
  158. playerInfo                 ds        NSpPlayerInfo    ; offset: $20 (32)
  159. sizeof                     EQU *                    ; size:   $50 (80)
  160.                         ENDR
  161. NSpPlayerLeftMessage    RECORD 0
  162. header                     ds        NSpMessageHeader ; offset: $0 (0)
  163. playerCount                 ds.l    1                ; offset: $1C (28)
  164. playerID                 ds.l    1                ; offset: $20 (32)
  165. playerName                 ds        NSpPlayerName    ; offset: $24 (36)
  166. sizeof                     EQU *                    ; size:   $44 (68)
  167.                         ENDR
  168. NSpHostChangedMessage    RECORD 0
  169. header                     ds        NSpMessageHeader ; offset: $0 (0)
  170. newHost                     ds.l    1                ; offset: $1C (28)
  171. sizeof                     EQU *                    ; size:   $20 (32)
  172.                         ENDR
  173. NSpGameTerminatedMessage RECORD 0
  174. header                     ds        NSpMessageHeader ; offset: $0 (0)
  175. sizeof                     EQU *                    ; size:   $1C (28)
  176.                         ENDR
  177. ;  Different kinds of messages.  These can NOT be bitwise ORed together 
  178.  
  179. kNSpSendFlag_Junk                EQU        $00100000            ; will be sent (try once) when there is nothing else pending 
  180. kNSpSendFlag_Normal                EQU        $00200000            ; will be sent immediately (try once) 
  181. kNSpSendFlag_Registered            EQU        $00400000            ; will be sent immediately (guaranteed, in order) 
  182.  
  183. ;  Options for message delivery.  These can be bitwise ORed together with each other,
  184. ;        as well as with ONE of the above 
  185.  
  186. kNSpSendFlag_FailIfPipeFull        EQU        $00000001
  187. kNSpSendFlag_SelfSend            EQU        $00000002
  188. kNSpSendFlag_Blocking            EQU        $00000004
  189.  
  190. ;  Options for Hosting Joining, and Deleting games 
  191.  
  192. kNSpGameFlag_DontAdvertise        EQU        $00000001
  193. kNSpGameFlag_ForceTerminateGame    EQU        $00000002
  194. ;  Message "what" types 
  195. ;  Apple reserves all negative "what" values (anything with bit 32 set) 
  196.  
  197. kNSpSystemMessagePrefix            EQU        $80000000
  198. kNSpError                        EQU        $FFFFFFFF
  199. kNSpJoinRequest                    EQU        $80000001
  200. kNSpJoinApproved                EQU        $80000002
  201. kNSpJoinDenied                    EQU        $80000003
  202. kNSpPlayerJoined                EQU        $80000004
  203. kNSpPlayerLeft                    EQU        $80000005
  204. kNSpHostChanged                    EQU        $80000006
  205. kNSpGameTerminated                EQU        $80000007
  206.  
  207. ;  Special TPlayerIDs  for sending messages 
  208.  
  209. kNSpAllPlayers                    EQU        $00000000
  210. kNSpHostOnly                    EQU        $FFFFFFFF
  211.  
  212. ;  NetSprocket Error Codes 
  213.  
  214. kNSpInitializationFailedErr        EQU        -30360
  215. kNSpAlreadyInitializedErr        EQU        -30361
  216. kNSpTopologyNotSupportedErr        EQU        -30362
  217. kNSpPipeFullErr                    EQU        -30364
  218. kNSpHostFailedErr                EQU        -30365
  219. kNSpProtocolNotAvailableErr        EQU        -30366
  220. kNSpInvalidGameRefErr            EQU        -30367
  221. kNSpInvalidParameterErr            EQU        -30369
  222. kNSpOTNotPresentErr                EQU        -30370
  223. kNSpOTVersionTooOldErr            EQU        -30371
  224. kNSpMemAllocationErr            EQU        -30373
  225. kNSpAlreadyAdvertisingErr        EQU        -30374
  226. kNSpNotAdvertisingErr            EQU        -30376
  227. kNSpInvalidAddressErr            EQU        -30377
  228. kNSpFreeQExhaustedErr            EQU        -30378
  229. kNSpRemovePlayerFailedErr        EQU        -30379
  230. kNSpAddressInUseErr                EQU        -30380
  231. kNSpFeatureNotImplementedErr    EQU        -30381
  232. kNSpNameRequiredErr                EQU        -30382
  233. kNSpInvalidPlayerIDErr            EQU        -30383
  234. kNSpInvalidGroupIDErr            EQU        -30384
  235. kNSpNoPlayersErr                EQU        -30385
  236. kNSpNoGroupsErr                    EQU        -30386
  237. kNSpNoHostVolunteersErr            EQU        -30387
  238. kNSpCreateGroupFailedErr        EQU        -30388
  239. kNSpAddPlayerFailedErr            EQU        -30389
  240. kNSpInvalidDefinitionErr        EQU        -30390
  241. kNSpInvalidProtocolRefErr        EQU        -30391
  242. kNSpInvalidProtocolListErr        EQU        -30392
  243. kNSpTimeoutErr                    EQU        -30393
  244. kNSpGameTerminatedErr            EQU        -30394
  245. kNSpConnectFailedErr            EQU        -30395
  246. kNSpSendFailedErr                EQU        -30396
  247. kNSpJoinFailedErr                EQU        -30399
  248.  
  249.  
  250.  
  251. ; ************************  Initialization  ***********************
  252. ;
  253. ; extern OSStatus NSpInitialize(UInt32 inStandardMessageSize, UInt32 inBufferSize, UInt32 inQElements, NSpGameID inGameID, UInt32 inTimeout)
  254. ;
  255.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  256.         IMPORT_CFM_FUNCTION NSpInitialize
  257.     ENDIF
  258.  
  259.  
  260.  
  261.  
  262. ; **************************  Protocols  *************************
  263. ;  Programmatic protocol routines 
  264. ;
  265. ; extern OSStatus NSpProtocol_New(const char *inDefinitionString, NSpProtocolReference *outReference)
  266. ;
  267.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  268.         IMPORT_CFM_FUNCTION NSpProtocol_New
  269.     ENDIF
  270.  
  271. ;
  272. ; extern void NSpProtocol_Dispose(NSpProtocolReference inProtocolRef)
  273. ;
  274.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  275.         IMPORT_CFM_FUNCTION NSpProtocol_Dispose
  276.     ENDIF
  277.  
  278. ;
  279. ; extern OSStatus NSpProtocol_ExtractDefinitionString(NSpProtocolReference inProtocolRef, char *outDefinitionString)
  280. ;
  281.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  282.         IMPORT_CFM_FUNCTION NSpProtocol_ExtractDefinitionString
  283.     ENDIF
  284.  
  285.  
  286. ;  Protocol list routines 
  287. ;
  288. ; extern OSStatus NSpProtocolList_New(NSpProtocolReference inProtocolRef, NSpProtocolListReference *outList)
  289. ;
  290.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  291.         IMPORT_CFM_FUNCTION NSpProtocolList_New
  292.     ENDIF
  293.  
  294. ;
  295. ; extern void NSpProtocolList_Dispose(NSpProtocolListReference inProtocolList)
  296. ;
  297.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  298.         IMPORT_CFM_FUNCTION NSpProtocolList_Dispose
  299.     ENDIF
  300.  
  301. ;
  302. ; extern OSStatus NSpProtocolList_Append(NSpProtocolListReference inProtocolList, NSpProtocolReference inProtocolRef)
  303. ;
  304.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  305.         IMPORT_CFM_FUNCTION NSpProtocolList_Append
  306.     ENDIF
  307.  
  308. ;
  309. ; extern OSStatus NSpProtocolList_Remove(NSpProtocolListReference inProtocolList, NSpProtocolReference inProtocolRef)
  310. ;
  311.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  312.         IMPORT_CFM_FUNCTION NSpProtocolList_Remove
  313.     ENDIF
  314.  
  315. ;
  316. ; extern OSStatus NSpProtocolList_RemoveIndexed(NSpProtocolListReference inProtocolList, UInt32 inIndex)
  317. ;
  318.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  319.         IMPORT_CFM_FUNCTION NSpProtocolList_RemoveIndexed
  320.     ENDIF
  321.  
  322. ;
  323. ; extern UInt32 NSpProtocolList_GetCount(NSpProtocolListReference inProtocolList)
  324. ;
  325.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  326.         IMPORT_CFM_FUNCTION NSpProtocolList_GetCount
  327.     ENDIF
  328.  
  329. ;
  330. ; extern NSpProtocolReference NSpProtocolList_GetIndexedRef(NSpProtocolListReference inProtocolList, UInt32 inIndex)
  331. ;
  332.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  333.         IMPORT_CFM_FUNCTION NSpProtocolList_GetIndexedRef
  334.     ENDIF
  335.  
  336.  
  337. ;  Helpers 
  338. ;
  339. ; extern NSpProtocolReference NSpProtocol_CreateAppleTalk(ConstStr31Param inNBPName, ConstStr31Param inNBPType, UInt32 inMaxRTT, UInt32 inMinThruput)
  340. ;
  341.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  342.         IMPORT_CFM_FUNCTION NSpProtocol_CreateAppleTalk
  343.     ENDIF
  344.  
  345. ;
  346. ; extern NSpProtocolReference NSpProtocol_CreateIP(InetPort inPort, UInt32 inMaxRTT, UInt32 inMinThruput)
  347. ;
  348.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  349.         IMPORT_CFM_FUNCTION NSpProtocol_CreateIP
  350.     ENDIF
  351.  
  352.  
  353. ; ***********************  Human Interface  ***********************
  354. ;
  355. ; extern NSpAddressReference NSpDoModalJoinDialog(ConstStr31Param inGameType, ConstStr255Param inEntityListLabel, Str31 ioName, Str31 ioPassword, NSpEventProcPtr inEventProcPtr)
  356. ;
  357.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  358.         IMPORT_CFM_FUNCTION NSpDoModalJoinDialog
  359.     ENDIF
  360.  
  361. ;
  362. ; extern Boolean NSpDoModalHostDialog(NSpProtocolListReference ioProtocolList, Str31 ioGameName, Str31 ioPlayerName, Str31 ioPassword, NSpEventProcPtr inEventProcPtr)
  363. ;
  364.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  365.         IMPORT_CFM_FUNCTION NSpDoModalHostDialog
  366.     ENDIF
  367.  
  368.  
  369. ; *********************  Hosting and Joining  *********************
  370. ;
  371. ; extern OSStatus NSpGame_Host(NSpGameReference *outGame, NSpProtocolListReference inProtocolList, UInt32 inMaxPlayers, ConstStr31Param inGameName, ConstStr31Param inPassword, ConstStr31Param inPlayerName, NSpPlayerType inPlayerType, NSpTopology inTopology, NSpFlags inFlags)
  372. ;
  373.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  374.         IMPORT_CFM_FUNCTION NSpGame_Host
  375.     ENDIF
  376.  
  377. ;
  378. ; extern OSStatus NSpGame_Join(NSpGameReference *outGame, NSpAddressReference inAddress, ConstStr31Param inName, ConstStr31Param inPassword, NSpPlayerType inType, void *inCustomData, UInt32 inCustomDataLen, NSpFlags inFlags)
  379. ;
  380.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  381.         IMPORT_CFM_FUNCTION NSpGame_Join
  382.     ENDIF
  383.  
  384. ;
  385. ; extern OSStatus NSpGame_EnableAdvertising(NSpGameReference inGame, NSpProtocolReference inProtocol, Boolean inEnable)
  386. ;
  387.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  388.         IMPORT_CFM_FUNCTION NSpGame_EnableAdvertising
  389.     ENDIF
  390.  
  391. ;
  392. ; extern OSStatus NSpGame_Dispose(NSpGameReference inGame, NSpFlags inFlags)
  393. ;
  394.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  395.         IMPORT_CFM_FUNCTION NSpGame_Dispose
  396.     ENDIF
  397.  
  398. ;
  399. ; extern OSStatus NSpGame_GetInfo(NSpGameReference inGame, NSpGameInfo *ioInfo)
  400. ;
  401.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  402.         IMPORT_CFM_FUNCTION NSpGame_GetInfo
  403.     ENDIF
  404.  
  405. ; **************************  Messaging  *************************
  406. ;
  407. ; extern OSStatus NSpMessage_Send(NSpGameReference inGame, NSpMessageHeader *inMessage, NSpFlags inFlags)
  408. ;
  409.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  410.         IMPORT_CFM_FUNCTION NSpMessage_Send
  411.     ENDIF
  412.  
  413. ;
  414. ; extern NSpMessageHeader *NSpMessage_Get(NSpGameReference inGame)
  415. ;
  416.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  417.         IMPORT_CFM_FUNCTION NSpMessage_Get
  418.     ENDIF
  419.  
  420. ;
  421. ; extern void NSpMessage_Release(NSpGameReference inGame, NSpMessageHeader *inMessage)
  422. ;
  423.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  424.         IMPORT_CFM_FUNCTION NSpMessage_Release
  425.     ENDIF
  426.  
  427. ;  Helpers 
  428. ;
  429. ; extern OSStatus NSpMessage_SendTo(NSpGameReference inGame, NSpPlayerID inTo, SInt32 inWhat, void *inData, UInt32 inDataLen, NSpFlags inFlags)
  430. ;
  431.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  432.         IMPORT_CFM_FUNCTION NSpMessage_SendTo
  433.     ENDIF
  434.  
  435.  
  436. ; *********************  Player Information  *********************
  437. ;
  438. ; extern NSpPlayerID NSpPlayer_GetMyID(NSpGameReference inGame)
  439. ;
  440.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  441.         IMPORT_CFM_FUNCTION NSpPlayer_GetMyID
  442.     ENDIF
  443.  
  444. ;
  445. ; extern OSStatus NSpPlayer_GetInfo(NSpGameReference inGame, NSpPlayerID inPlayerID, NSpPlayerInfoPtr *outInfo)
  446. ;
  447.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  448.         IMPORT_CFM_FUNCTION NSpPlayer_GetInfo
  449.     ENDIF
  450.  
  451. ;
  452. ; extern void NSpPlayer_ReleaseInfo(NSpGameReference inGame, NSpPlayerInfoPtr inInfo)
  453. ;
  454.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  455.         IMPORT_CFM_FUNCTION NSpPlayer_ReleaseInfo
  456.     ENDIF
  457.  
  458. ;
  459. ; extern OSStatus NSpPlayer_GetEnumeration(NSpGameReference inGame, NSpPlayerEnumerationPtr *outPlayers)
  460. ;
  461.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  462.         IMPORT_CFM_FUNCTION NSpPlayer_GetEnumeration
  463.     ENDIF
  464.  
  465. ;
  466. ; extern void NSpPlayer_ReleaseEnumeration(NSpGameReference inGame, NSpPlayerEnumerationPtr inPlayers)
  467. ;
  468.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  469.         IMPORT_CFM_FUNCTION NSpPlayer_ReleaseEnumeration
  470.     ENDIF
  471.  
  472. ;
  473. ; extern UInt32 NSpPlayer_GetRoundTripTime(NSpGameReference inGame, NSpPlayerID inPlayer)
  474. ;
  475.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  476.         IMPORT_CFM_FUNCTION NSpPlayer_GetRoundTripTime
  477.     ENDIF
  478.  
  479. ;
  480. ; extern UInt32 NSpPlayer_GetThruput(NSpGameReference inGame, NSpPlayerID inPlayer)
  481. ;
  482.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  483.         IMPORT_CFM_FUNCTION NSpPlayer_GetThruput
  484.     ENDIF
  485.  
  486.  
  487. ; *********************  Group Management  *********************
  488. ;
  489. ; extern OSStatus NSpGroup_New(NSpGameReference inGame, NSpGroupID *outGroupID)
  490. ;
  491.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  492.         IMPORT_CFM_FUNCTION NSpGroup_New
  493.     ENDIF
  494.  
  495. ;
  496. ; extern OSStatus NSpGroup_Dispose(NSpGameReference inGame, NSpGroupID inGroupID)
  497. ;
  498.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  499.         IMPORT_CFM_FUNCTION NSpGroup_Dispose
  500.     ENDIF
  501.  
  502. ;
  503. ; extern OSStatus NSpGroup_AddPlayer(NSpGameReference inGame, NSpGroupID inGroupID, NSpPlayerID inPlayerID)
  504. ;
  505.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  506.         IMPORT_CFM_FUNCTION NSpGroup_AddPlayer
  507.     ENDIF
  508.  
  509. ;
  510. ; extern OSStatus NSpGroup_RemovePlayer(NSpGameReference inGame, NSpGroupID inGroupID, NSpPlayerID inPlayerID)
  511. ;
  512.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  513.         IMPORT_CFM_FUNCTION NSpGroup_RemovePlayer
  514.     ENDIF
  515.  
  516. ;
  517. ; extern OSStatus NSpGroup_GetInfo(NSpGameReference inGame, NSpGroupID inGroupID, NSpGroupInfoPtr *outInfo)
  518. ;
  519.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  520.         IMPORT_CFM_FUNCTION NSpGroup_GetInfo
  521.     ENDIF
  522.  
  523. ;
  524. ; extern void NSpGroup_ReleaseInfo(NSpGameReference inGame, NSpGroupInfoPtr inInfo)
  525. ;
  526.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  527.         IMPORT_CFM_FUNCTION NSpGroup_ReleaseInfo
  528.     ENDIF
  529.  
  530. ;
  531. ; extern OSStatus NSpGroup_GetEnumeration(NSpGameReference inGame, NSpGroupEnumerationPtr *outGroups)
  532. ;
  533.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  534.         IMPORT_CFM_FUNCTION NSpGroup_GetEnumeration
  535.     ENDIF
  536.  
  537. ;
  538. ; extern void NSpGroup_ReleaseEnumeration(NSpGameReference inGame, NSpGroupEnumerationPtr inGroups)
  539. ;
  540.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  541.         IMPORT_CFM_FUNCTION NSpGroup_ReleaseEnumeration
  542.     ENDIF
  543.  
  544.  
  545. ; **************************  Utilities  **************************
  546. ;
  547. ; extern NumVersion NSpGetVersion(void )
  548. ;
  549.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  550.         IMPORT_CFM_FUNCTION NSpGetVersion
  551.     ENDIF
  552.  
  553. ;
  554. ; extern void NSpClearMessageHeader(NSpMessageHeader *inMessage)
  555. ;
  556.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  557.         IMPORT_CFM_FUNCTION NSpClearMessageHeader
  558.     ENDIF
  559.  
  560. ;
  561. ; extern UInt32 NSpGetCurrentTimeStamp(NSpGameReference inGame)
  562. ;
  563.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  564.         IMPORT_CFM_FUNCTION NSpGetCurrentTimeStamp
  565.     ENDIF
  566.  
  567. ;
  568. ; extern NSpAddressReference NSpConvertOTAddrToAddressReference(OTAddress *inAddress)
  569. ;
  570.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  571.         IMPORT_CFM_FUNCTION NSpConvertOTAddrToAddressReference
  572.     ENDIF
  573.  
  574. ;
  575. ; extern OTAddress *NSpConvertAddressReferenceToOTAddr(NSpAddressReference inAddress)
  576. ;
  577.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  578.         IMPORT_CFM_FUNCTION NSpConvertAddressReferenceToOTAddr
  579.     ENDIF
  580.  
  581. ;
  582. ; extern void NSpReleaseAddressReference(NSpAddressReference inAddress)
  583. ;
  584.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  585.         IMPORT_CFM_FUNCTION NSpReleaseAddressReference
  586.     ENDIF
  587.  
  588.  
  589. ; ************************ Advanced/Async routines ***************
  590. ;
  591. ; extern OSStatus NSpInstallCallbackHandler(NSpCallbackProcPtr inHandler, void *inContext)
  592. ;
  593.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  594.         IMPORT_CFM_FUNCTION NSpInstallCallbackHandler
  595.     ENDIF
  596.  
  597.  
  598. ;
  599. ; extern OSStatus NSpInstallJoinRequestHandler(NSpJoinRequestHandlerProcPtr inHandler, void *inContext)
  600. ;
  601.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  602.         IMPORT_CFM_FUNCTION NSpInstallJoinRequestHandler
  603.     ENDIF
  604.  
  605.  
  606. ;
  607. ; extern OSStatus NSpInstallAsyncMessageHandler(NSpMessageHandlerProcPtr inHandler, void *inContext)
  608. ;
  609.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  610.         IMPORT_CFM_FUNCTION NSpInstallAsyncMessageHandler
  611.     ENDIF
  612.  
  613.  
  614.  
  615.     ENDIF    ; TARGET_OS_MAC
  616.     ENDIF ; __NETSPROCKET__ 
  617.  
  618.